<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activIds']))
{
  header("Location:checkLogin.php");
}
else
{
  $m=0;
  $invoiceArray = array();  
  $selectContract = "SELECT  invoiceId,contractId,invoiceNo
                        FROM invoice
                       WHERE contractId = ".$_REQUEST['contractId'];
                            
  $selectContractRes = mysql_query($selectContract);
  while($invoiceRow = mysql_fetch_array($selectContractRes))
  {
  	$invoiceArray['invoiceId'][$m]      = $invoiceRow['invoiceId'];
  	$invoiceArray['invoiceNo'][$m]      = $invoiceRow['invoiceNo'];
  	$m++;
  }
}
include("bottom.php");
$smarty->assign("invoiceArray",$invoiceArray);
$smarty->display("getInvoiceDetailNo.tpl");
?>